package com.link2room.rodimus.feign.soundwave;

import com.link2room.common.dto.result.base.BaseResultDto;
import com.link2room.rodimus.dto.param.inside.MemberPackageInsideParamDto;
import com.link2room.soundwave.dto.param.inside.MemberCoupenCodeCollarCoupenInsideParamDto;
import com.link2room.soundwave.dto.param.inside.MemberLoginInsideParamDto;
import com.link2room.soundwave.dto.param.inside.MemberUpgradeInsideParamDto;
import com.link2room.soundwave.dto.param.inside.PointPresentUseInsideParamDto;
import com.link2room.soundwave.dto.param.inside.UsableCouopnsInsideParamDto;
import com.link2room.soundwave.dto.result.base.*;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @author sqj88
 * @date 2017/11/11 21:09
 */
@FeignClient("${spring.gateway.name}/${feign.soundwave}")
public interface PmsMemberFeignService {
    /**
     * 销售券
     * @param usableCouopnsInsideParamDto
     * @return
     * @throws Exception
     */
    @RequestMapping(method = RequestMethod.POST,value = "/in/PMSMembers/SaleCoupons",consumes = MediaType.APPLICATION_JSON_VALUE)
    BaseResultDto saleCoupons(@RequestBody UsableCouopnsInsideParamDto usableCouopnsInsideParamDto) throws Exception;
    /**
     * 使用积分
     * @param pointPresentUseInsideParamDto
     * @return
     * @throws Exception
     */
    @RequestMapping(method = RequestMethod.POST,value = "/in/PMSMembers/UsePoint",consumes = MediaType.APPLICATION_JSON_VALUE)
    BaseResultDto usePoint(@RequestBody PointPresentUseInsideParamDto pointPresentUseInsideParamDto) throws Exception;
    /**
     * 增加积分
     * @param pointPresentUseInsideParamDto
     * @return
     * @throws Exception
     */
    @RequestMapping(method = RequestMethod.POST,value = "/in/PMSMembers/AddPoint",consumes = MediaType.APPLICATION_JSON_VALUE)
    BaseResultDto addPoint(@RequestBody PointPresentUseInsideParamDto pointPresentUseInsideParamDto) throws Exception;
    /**
     * 绑定PMS会员
     * @param paramMap
     * @return
     * @throws Exception
     */
    @RequestMapping(method = RequestMethod.GET,value = "/in/PMSMembers/BindingPMSMember",consumes = MediaType.APPLICATION_JSON_VALUE)
    BaseResultDto<PmsMemberInfoDto> bindingPMSMember(@RequestParam Map<String, Object> paramMap) throws Exception;
    /**
     * 获取PMS会员卡余额信息
     * @param paramMap
     * @return
     * @throws Exception
     */
    @RequestMapping(method = RequestMethod.GET,value = "/in/PMSMembers/GetCardBalanceInfo",consumes = MediaType.APPLICATION_JSON_VALUE)
    BaseResultDto<PmsCardBalanceDto> getCardBalanceInfo(@RequestParam Map<String, Object> paramMap) throws Exception;
    /**
     * 检查PMS会员卡
     * @param paramMap
     * @return
     * @throws Exception
     */
    @RequestMapping(method = RequestMethod.GET,value = "/in/PMSMembers/CheckPMSMember",consumes = MediaType.APPLICATION_JSON_VALUE)
    BaseResultDto<PmsMemberInfoDto> checkPMSMember(@RequestParam Map<String, Object> paramMap) throws Exception;
    /**
     * 获取PMS会员积分
     * @param paramMap
     * @return
     * @throws Exception
     */
    @RequestMapping(method = RequestMethod.GET,value = "/in/PMSMembers/Points",consumes = MediaType.APPLICATION_JSON_VALUE)
    BaseResultDto<PmsMemberPointDto> getPMSMemberPoints(@RequestParam Map<String, Object> paramMap) throws Exception;
    /**
     * 获取PMS会员积分明细
     * @param paramMap
     * @return
     * @throws Exception
     */
    @RequestMapping(method = RequestMethod.GET,value = "/in/PMSMembers/PointsDetail",consumes = MediaType.APPLICATION_JSON_VALUE)
    BaseResultDto<PmsCardPointDto> getPMSMemberPointDetail(@RequestParam Map<String, Object> paramMap) throws Exception;
    /**
     * 获取PMS电子券
     * @param paramMap
     * @return
     * @throws Exception
     */
    @RequestMapping(method = RequestMethod.GET,value = "/in/PMSMembers/Coupons",consumes = MediaType.APPLICATION_JSON_VALUE)
    BaseResultDto<PmsCouponDto> getPMSMemberCoupons(@RequestParam Map<String, Object> paramMap) throws Exception;
    /**
     * 获取PMS可用电子券
     * @param paramMap
     * @return
     * @throws Exception
     */
    @RequestMapping(method = RequestMethod.GET,value = "/in/PMSMembers/UsableCoupons",consumes = MediaType.APPLICATION_JSON_VALUE)
    BaseResultDto<PmsCouponDto> getUsableCoupons(@RequestParam Map<String, Object> paramMap) throws Exception;
    /**
     * 自动创建会员
     * @param memberLoginInsideParamDto
     * @return
     * @throws Exception
     */
    @RequestMapping(method = RequestMethod.POST,value = "/in/PMSMembers/AutoMember",consumes = MediaType.APPLICATION_JSON_VALUE)
    BaseResultDto<PmsMemberInfoDto> autoPMSMember(@RequestBody MemberLoginInsideParamDto memberLoginInsideParamDto) throws Exception;
    /**
     * 同步PMS会员信息
     * @param paramMap
     * @return
     * @throws Exception
     */
    @RequestMapping(method = RequestMethod.GET,value = "/in/PMSMembers/SyncMember",consumes = MediaType.APPLICATION_JSON_VALUE)
    BaseResultDto<PmsMemberInfoDto> syncMember(@RequestParam Map<String, Object> paramMap) throws Exception;
    /**
     * 解绑PMS会员
     * @param memberLoginParamDto
     * @return
     * @throws Exception
     */
    @RequestMapping(method = RequestMethod.POST,value = "/in/PMSMembers/UnbindingPMSMember",consumes = MediaType.APPLICATION_JSON_VALUE)
    BaseResultDto unbindingPMSMember(@RequestBody MemberLoginInsideParamDto memberLoginParamDto) throws Exception;

    /**
     * 发放电子券
     * @return
     */
    @RequestMapping(method = RequestMethod.POST,value = "/in/PMSMembers/SaleCouponsNew",consumes = MediaType.APPLICATION_JSON_VALUE)
    BaseResultDto saleCouponsNew(@RequestBody UsableCouopnsInsideParamDto paramDto);

    /**
     * 购卡升级
     * @return
     */
    @RequestMapping(method = RequestMethod.PUT,value = "/in/PMSMembers/UpgradeMmeber",consumes = MediaType.APPLICATION_JSON_VALUE)
    BaseResultDto upgradeMmeber(@RequestBody MemberUpgradeInsideParamDto paramDto);

    /**
     * pms礼包
     * @param paramDto
     * @return
     */
    @RequestMapping(method = RequestMethod.POST,value = "/in/PMSMembers/ExchangePackage",consumes = MediaType.APPLICATION_JSON_VALUE)
    BaseResultDto exchangePackage(@RequestBody MemberPackageInsideParamDto paramDto);
    
    /**
     * 兑换码领用优惠券
     * @param paramDto
     * @return
     */
    @RequestMapping(method = RequestMethod.POST,value = "/in/PMSMembers/CoupenCodeCollarCoupen",consumes = MediaType.APPLICATION_JSON_VALUE)
    BaseResultDto coupenCodeCollarCoupen(@RequestBody MemberCoupenCodeCollarCoupenInsideParamDto paramDto);

}
